home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / patches / ami301c.zip / QKTEMP.SM$ / QKTEMP.SMM
INI File  |  1993-05-15  |  21KB  |  939 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     _DEFAULT.STY
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     QMS-PS 810
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Calculates temperature conversions between Fahrenheit and Celsius.
  19.     
  20.     
  21.     
  22.     
  23.     737497646
  24.     18
  25.     733695425
  26.     621
  27.     4
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     1
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [tag]
  56.     Body Text
  57.     2
  58.     [fnt]
  59.         Times New Roman
  60.         200
  61.         0
  62.         49152
  63.     [algn]
  64.         1
  65.         1
  66.         0
  67.         0
  68.         0
  69.     [spc]
  70.         33
  71.         273
  72.         1
  73.         0
  74.         0
  75.         1
  76.         100
  77.     [brk]
  78.         4
  79.     [line]
  80.         8
  81.         0
  82.         1
  83.         0
  84.         1
  85.         1
  86.         1
  87.         10
  88.         10
  89.         1
  90.     [spec]
  91.         0
  92.         0
  93.         
  94.         0
  95.         1
  96.         1
  97.         0
  98.         0
  99.         0
  100.         0
  101.     [nfmt]
  102.         280
  103.         1
  104.         2
  105.         .
  106.         ,
  107.         $
  108.     Body Text
  109.     0
  110.     0
  111. [lay]
  112.     Standard
  113.     513
  114.     [rght]
  115.         15840
  116.         12240
  117.         1
  118.         1440
  119.         792
  120.         1
  121.         1080
  122.         1440
  123.         0
  124.         1
  125.         0
  126.         1
  127.         0
  128.         2
  129.         1
  130.         1440
  131.         10800
  132.         12
  133.         1
  134.         720
  135.         1
  136.         1440
  137.         1
  138.         2160
  139.         1
  140.         2880
  141.         1
  142.         3600
  143.         1
  144.         4320
  145.         1
  146.         5040
  147.         1
  148.         5760
  149.         1
  150.         6480
  151.         1
  152.         7200
  153.         1
  154.         7920
  155.         1
  156.         8640
  157.     [hrght]
  158.     [lyfrm]
  159.         1
  160.         11200
  161.         0
  162.         0
  163.         12240
  164.         1080
  165.         0
  166.         1
  167.         3
  168.         1 0 0 0 0 0 0
  169.         0
  170.         0
  171.         1
  172.     [frmlay]
  173.         1080
  174.         12240
  175.         1
  176.         1440
  177.         0
  178.         1
  179.         504
  180.         1440
  181.         0
  182.         1
  183.         0
  184.         1
  185.         1
  186.         0
  187.         1
  188.         1440
  189.         10800
  190.         2
  191.         2
  192.         4680
  193.         3
  194.         9360
  195.     [txt]
  196. QkTemp: Mark Osborne and Daniel Wilder
  197.  
  198. Lotus WPD
  199.  
  200. >
  201.     [frght]
  202.     [lyfrm]
  203.         1
  204.         13248
  205.         0
  206.         15048
  207.         12240
  208.         15840
  209.         0
  210.         1
  211.         3
  212.         1 0 0 0 0 0 0
  213.         0
  214.         0
  215.         2
  216.     [frmlay]
  217.         15840
  218.         12240
  219.         1
  220.         1440
  221.         720
  222.         1
  223.         15120
  224.         1440
  225.         0
  226.         1
  227.         0
  228.         1
  229.         1
  230.         0
  231.         1
  232.         1440
  233.         10800
  234.         2
  235.         2
  236.         4680
  237.         3
  238.         9360
  239.     [txt]
  240. >
  241. [elay]
  242. [l1]
  243.     0
  244. [pg]
  245.     4
  246.     57 0 38 0 0 1 0 65535 5 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  247.     112 0 45 0 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  248.     165 0 40 0 0 1 0 65535 5 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  249.     190 0 10 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  250. [edoc]
  251. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Declare FontDlg(Action, Hdlg, id)
  252.  
  253. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Declare CellEngine(Action)
  254.  
  255. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Declare Callback(hdlg,id,val)
  256.  
  257. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  258.  
  259. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  260.  
  261. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Define Descript "Enter the temperature to be converted: "
  262.  
  263. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  264.  
  265. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Define DescriptHolder    1008
  266.  
  267. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Define AnswerHolder1    8010<:f>
  268.  
  269. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Define AnswerHolder2    1007
  270.  
  271. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Define AnswerHolder3    22
  272.  
  273. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  274.  
  275. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>Function Main()
  276.  
  277. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>MacName = GetRunningMacroFile$()
  278.  
  279. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgCallBack(0, "{MacName}!InitDlg")
  280.  
  281. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgCallBack(20, "{MacName}!CallBack")    'For C raido
  282.  
  283. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgCallBack(21, "{MacName}!CallBack")    'For F radio
  284.  
  285. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgCallBack(8001, "{MacName}!CallBack")    'For edit field
  286.  
  287. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgCallBack(33, "{MacName}!CallBack")    'For copy button
  288.  
  289. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  290.  
  291. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  292.  
  293. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(1,0,0)    'Create font
  294.  
  295. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  296.  
  297. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FillEdit(DescriptHolder,Descript)
  298.  
  299. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>macpath = GetMacPath$()
  300.  
  301. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FillEdit(1001,"{macpath}qktemp.bmt")
  302.  
  303. @Outline3@<:S+-1><:#240,9360>DlgKeyInterrupt(112, "{macName}!DisplayHelp")
  304.  
  305. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  306.  
  307. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  308.  
  309. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>box = DialogBox(".","QuickTemp")
  310.  
  311. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>If Box = 3
  312.  
  313. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>    ' Copy the answer to the clipboard
  314.  
  315. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>    Answer = GetDialogField$(8010)
  316.  
  317. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>    ClipBoardWrite(Answer,1)
  318.  
  319. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Endif
  320.  
  321. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  322.  
  323. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(4,0,0)        'Free font object
  324.  
  325. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>End Function
  326.  
  327. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  328.  
  329. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>Function Callback(hdlg,id,val)
  330.  
  331. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>IgnoreKeyboard(2)
  332.  
  333. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,194,0,0>ConvertFraction=9/5    
  334.  
  335. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>if (id  = 33)                  'copy button selected
  336.  
  337. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8000)
  338.  
  339. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>If Temp <<<;> ""
  340.  
  341. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>ClipBoardWrite(Temp,1) 
  342.  
  343. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>EndIf
  344.  
  345. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>exit function
  346.  
  347. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>endif
  348.  
  349. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  350.  
  351. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>if  GetDlgItemText(hdlg,20)         'F to C
  352.  
  353. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8001)
  354.  
  355. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>if IsNumeric(Temp)
  356.  
  357. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>F = <:f200,2Times New Roman,194,0,0>(Temp - 32.0)/ ConvertFraction
  358.  
  359. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>If F << (0 - 273.33<:f200,2Times New Roman,194,0,0>)
  360.  
  361. <+@><:S+-1><:#240,9360>                <:f200,2Times New Roman,194,0,0>F = "ERR"
  362.  
  363. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>Else
  364.  
  365. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>F= FormatNum$("","<:f200,2Times New Roman,194,0,0></p><:f200,2Times New Roman,0,0,0>",<:f200,2Times New Roman,194,0,0>2<:f200,2Times New Roman,0,0,0>,F)
  366.  
  367. <+@><:S+-1><:#240,9360>                <:f200,2Times New Roman,194,0,0>If MID$(F, 1, 2) = "-,"
  368.  
  369. <+@><:S+-1><:#480,9360>                    <:f200,2Times New Roman,194,0,0>F = StrCat$(Left$(F, 1),Right$(F,Len(F) - 2))                            EndIf
  370.  
  371. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>EndIf
  372.  
  373. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,F)
  374.  
  375. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, 8000,F)    
  376.  
  377. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer: 
  378. </p>C" )
  379.  
  380. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>elseif Temp = ""        'if user backspaces number to empty then put null to answer
  381.  
  382. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,"")
  383.  
  384. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer: 
  385. </p>C" )
  386.  
  387. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>endif
  388.  
  389. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>elseif     GetDlgItemText(hdlg,21)    'C to F
  390.  
  391. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Temp = GetDlgItemText(hDlg, 8001)
  392.  
  393. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>if IsNumeric(Temp)
  394.  
  395. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>C = <:f200,2Times New Roman,194,0,0>(Temp 
  396. <:f200,2Times New Roman,194,0,0>* <:f200,2Times New Roman,194,0,0>ConvertFraction<:f200,2Times New Roman,194,0,0>)<:f200,2Times New Roman,194,0,0> + 32.0
  397.  
  398. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>If C << (0 - 459.995)
  399.  
  400. <+@><:S+-1><:#240,9360>                <:f200,2Times New Roman,194,0,0>C = "ERR"
  401.  
  402. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>Else
  403.  
  404. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,0,0,0>= FormatNum$("","<:f200,2Times New Roman,194,0,0></p><:f200,2Times New Roman,0,0,0>",<:f200,2Times New Roman,194,0,0>2<:f200,2Times New Roman,0,0,0>,<:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,0,0,0>
  405. )
  406.  
  407. <+@><:S+-1><:#240,9360>                <:f200,2Times New Roman,194,0,0>If MID$(C, 1, 2) = "-,"
  408.  
  409. <+@><:S+-1><:#240,9360>                    <:f200,2Times New Roman,194,0,0>C<:f200,2Times New Roman,194,0,0> = StrCat$(Left$(C, 1),Right$(C,Len(C<:f200,2Times New Roman,194,0,0>) - 2))
  410.  
  411. <+@><:S+-1><:#240,9360>                <:f200,2Times New Roman,194,0,0>EndIf
  412.  
  413. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,194,0,0>EndIf
  414.  
  415. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,C)
  416.  
  417. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg,8000,C)
  418.  
  419. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer: 
  420. </p>F")
  421.  
  422. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>elseif    Temp = ""    'if user backspaces number to empty then put null to answer
  423.  
  424. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, AnswerHolder1,"")
  425.  
  426. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetDlgItemText(hDlg,AnswerHolder3,"Answer: 
  427. </p>F")
  428.  
  429. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>endif
  430.  
  431. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>endif            
  432.  
  433. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>end function
  434.  
  435. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  436.  
  437. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>Function InitDlg(Hdlg, Id, Value)
  438.  
  439. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>IgnoreKeyBoard(2)
  440.  
  441. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>HourGlass(on)
  442.  
  443. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1005)
  444.  
  445. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1008)
  446.  
  447. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3, Hdlg, 1003)
  448.  
  449. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 20)
  450.  
  451. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 22)
  452.  
  453. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>FontDlg(3,Hdlg, 21)        
  454.  
  455. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>SetDlgItemText( hDlg, 20,1)    'init celsius
  456.  
  457. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>HourGlass(off)
  458.  
  459. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>End Function
  460.  
  461. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  462.  
  463. <+@><:S+-1><+!><+"><:f240,2Times New Roman,0,0,0>
  464.  
  465. @Subhead@<:S+-1>function DisplayHelp()
  466.  
  467. @Outline2@<:#240,9360>' two defines needed for help.  The help name and panel number are defined above
  468.  
  469. @Outline2@<:#240,9360>define FindWindowa() DllCall("user,FindWindow,HCC", %1, %2)
  470.  
  471. @Outline2@<:#240,9360>define WinHelpa(hWnd, file, cmd, ptr)    DllCall("user,WinHelp,HHCHJ", %1, %2, %3, %4)
  472.  
  473. @Outline2@<:#240,9360>prohWnd = FindWindowa("AmiProWndA", 0)
  474.  
  475. @Outline2@<:#240,9360>helpfile = strcat$(GetAmiDirectory$(), "HelpPack.hlp")
  476.  
  477. @Outline2@PanelNum= 70 
  478.  
  479. @Outline2@<:#240,9360>WinHelpa(prohWnd, helpfile, 0x0001, Panelnum)
  480.  
  481. @Outline2@<:#240,9360>end function
  482.  
  483. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  484.  
  485. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  486.  
  487. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  488.  
  489. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  490.  
  491. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>Function FontDlg(Action, Hdlg, id)
  492.  
  493. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>' 1    Create a font and allocvar
  494.  
  495. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>' 2    Return the handle of the create font 
  496.  
  497. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>' 3    Set the id specified to the font
  498.  
  499. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>' 4    Freeglobalvar and delete created object
  500.  
  501. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  502.  
  503. <+@><:S+-1><:#568,9360><:f240,,>define    CreateFontDLG()        DllCall("gdi,CreateFont,HHHHHHHHHHHHHHC", %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14)
  504.  
  505. <+@><:S+-1><:#284,9360><:f240,,>define    DeleteObjectDLG(handle)    DllCall("gdi,DeleteObject,HH", %1)
  506.  
  507. <+@><:S+-1><:#568,9360><:f240,,>define    SendMessageDLG(hwnd, msg, wpara, lparm)    DllCall("user,SendMessage,HHHHJ", %1, %2, %3, %4)
  508.  
  509. <+@><:S+-1><:#284,9360><:f240,,>
  510.  
  511. <+@><:S+-1><:#284,9360><:f240,,>
  512.  
  513. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>Switch Action
  514.  
  515. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>Case 1    ' Create the font and store it
  516.  
  517. <+@><:S+-1><:#284,9360>        <:f240,,>Font = CreateFontDLG(13, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 32, "Helv")
  518.  
  519. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>AllocGlobalVar("FontHandle",1)
  520.  
  521. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>If Font
  522.  
  523. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SetGlobalVar("FontHandle",Font)
  524.  
  525. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return Font
  526.  
  527. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Else
  528.  
  529. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return 0;    ' no font
  530.  
  531. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Endif
  532.  
  533. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Break;
  534.  
  535. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>Case 2    ' Return the handle to the font
  536.  
  537. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Handle = GetGlobalVar$("FontHandle")
  538.  
  539. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>If Handle 
  540.  
  541. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return Handle
  542.  
  543. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Else
  544.  
  545. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return 0
  546.  
  547. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Endif
  548.  
  549. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  550.  
  551. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>Case 3    ' Set the id to the font
  552.  
  553. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Handle = GetGlobalVar$("FontHandle")
  554.  
  555. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>If Handle 
  556.  
  557. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>IdControl = GetDlgITem(Hdlg, id)
  558.  
  559. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>SendMessageDlg(idControl, 0x30, Handle, 0)
  560.  
  561. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return 1
  562.  
  563. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Else
  564.  
  565. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Return 0
  566.  
  567. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Endif
  568.  
  569. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Break;        
  570.  
  571. <+@><:S+-1><:#240,9360>        
  572.  
  573. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>Case 4    ' Delete the font and clear the var
  574.  
  575. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Handle = GetGlobalVar$("FontHandle")
  576.  
  577. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>If Handle
  578.  
  579. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>DeleteObjectDLG(Handle)
  580.  
  581. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Stat = 1    
  582.  
  583. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Else
  584.  
  585. <+@><:S+-1><:#240,9360>            <:f200,2Times New Roman,0,0,0>Stat = 0
  586.  
  587. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Endif
  588.  
  589. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>FreeGlobalVar("FontHandle")
  590.  
  591. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Return Stat        
  592.  
  593. <+@><:S+-1><:#240,9360>    <:f200,2Times New Roman,0,0,0>Default
  594.  
  595. <+@><:S+-1><:#240,9360>        <:f200,2Times New Roman,0,0,0>Message("Fontdlg received an invalid parameter {Action}")
  596.  
  597. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>EndSwitch    
  598.  
  599. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>End Function
  600.  
  601. <+@><:S+-1><:#284,9360><+!><+"><:f240,2Times New Roman,0,0,0>
  602.  
  603. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  604.  
  605. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  606.  
  607. <+@><:S+-1><:#240,9360><:f200,2Times New Roman,0,0,0>
  608.  
  609. DIALOG    QuickTemp
  610.  
  611. -2134376448    10    56    36    140    85    ""    "AmiDialog"    "QuickTemp"
  612.  
  613. FONT    8    "Helv"
  614.  
  615. 34    43    36    12    8001    1350631424    "edit"    ""    0 
  616.  
  617. 8    61    80    10    20    1342242825    "button"    "</p>&Fahrenheit to Celsius"    0 
  618.  
  619. 8    71    82    11    21    1342242825    "button"    "</p>&Celsius to Fahrenheit"    0 
  620.  
  621. 95    3    40    14    1    1342373889    "button"    "Done"    0 
  622.  
  623. 95    19    40    14    3    1342373888    "button"    "Copy"    0 
  624.  
  625. 4    2    26    34    1001    1342177290    "static"    ""    0 
  626.  
  627. 97    61    30    11    8010    1342177280    "static"    ""    0 
  628.  
  629. 34    15    49    27    1008    1342177280    "static"    ""    0 
  630.  
  631. 91    39    43    41    22    1342177287    "button"    "Answer: </p>C"    0 
  632.  
  633. 199    48    50    12    8000    1350566016    "edit"    ""    0 
  634.  
  635. END DIALOG
  636.  
  637. >
  638.  
  639. [Embedded]
  640. 00017390
  641. >
  642. [macsum] 6
  643. Main 0 0 5 12
  644. Callback 413 3 5 39
  645. InitDlg 1658 3 1 90
  646. DisplayHelp 1869 0 4 104
  647. FontDlg 2054 3 5 117
  648. QuickTemp 2900 0 -1 176
  649. [macse]
  650. 14 Main
  651. 0 802
  652. 13
  653. 8 1
  654. 0 41 0 "{1}!InitDlg"
  655. 0 41 20 "{1}!CallBack"
  656. 0 41 21 "{1}!CallBack"
  657. 0 41 8001 "{1}!CallBack"
  658. 0 41 33 "{1}!CallBack"
  659. 16 FontDlg 1 0 0
  660. 0 31 1008 "Enter the temperature to be converted: "
  661. 0 295
  662. 13
  663. 8 2
  664. 0 31 1001 "{2}qktemp.bmt"
  665. 0 47 112 "{1}!DisplayHelp"
  666. 0 26 "." "QuickTemp"
  667. 13
  668. 8 3
  669. 6 3
  670. 5 3
  671. 18 0
  672. 11 00000383
  673. 0 27 8010
  674. 13
  675. 8 4
  676. 0 1038 "{4}" 1
  677. 16 FontDlg 4 0 0
  678. 6 0
  679. 15
  680. 9
  681. 14 Callback
  682. 0 32 2
  683. 5 9
  684. 5 5
  685. 4 1
  686. 8 4
  687. 6 1
  688. 5 33
  689. 18 0
  690. 11 00000155
  691. 0 42 "{0}" 8000
  692. 13
  693. 8 5
  694. 6 5
  695. 7 ""
  696. 18 1
  697. 11 00000143
  698. 0 1038 "{5}" 1
  699. 6 3
  700. 15
  701. 9
  702. 0 42 "{0}" 20
  703. 13
  704. 11 00000700
  705. 0 42 "{0}" 8001
  706. 13
  707. 8 5
  708. 0 277 "{5}"
  709. 13
  710. 11 00000606
  711. 6 5
  712. 5 32.0
  713. 3 1
  714. 6 4
  715. 4 1
  716. 8 6
  717. 6 6
  718. 5 0
  719. 5 273.33
  720. 3 1
  721. 18 5
  722. 11 00000347
  723. 7 "ERR"
  724. 8 6
  725. 10 00000516
  726. 0 19 "" "</p>" 2 "{6}"
  727. 13
  728. 8 6
  729. 0 15 "{6}" 1 2
  730. 13
  731. 7 "-,"
  732. 18 0
  733. 11 00000516
  734. 0 806 "{6}" 1
  735. 13
  736. 0 14 "{6}"
  737. 13
  738. 5 2
  739. 3 1
  740. 0 807 "{6}" [X]
  741. 13
  742. 0 16 [X] [X]
  743. 13
  744. 8 6
  745. 0 43 "{0}" 8010 "{6}"
  746. 0 43 "{0}" 8000 "{6}"
  747. 0 43 "{0}" 22 "Answer: </p>C"
  748. 10 00000687
  749. 6 5
  750. 7 ""
  751. 18 0
  752. 11 00000687
  753. 0 43 "{0}" 8010 ""
  754. 0 43 "{0}" 22 "Answer: </p>C"
  755. 10 00001233
  756. 0 42 "{0}" 21
  757. 13
  758. 11 00001233
  759. 0 42 "{0}" 8001
  760. 13
  761. 8 5
  762. 0 277 "{5}"
  763. 13
  764. 11 00001152
  765. 6 5
  766. 6 4
  767. 4 0
  768. 5 32.0
  769. 3 0
  770. 8 7
  771. 6 7
  772. 5 0
  773. 5 459.995
  774. 3 1
  775. 18 5
  776. 11 00000893
  777. 7 "ERR"
  778. 8 7
  779. 10 00001062
  780. 0 19 "" "</p>" 2 "{7}"
  781. 13
  782. 8 7
  783. 0 15 "{7}" 1 2
  784. 13
  785. 7 "-,"
  786. 18 0
  787. 11 00001062
  788. 0 806 "{7}" 1
  789. 13
  790. 0 14 "{7}"
  791. 13
  792. 5 2
  793. 3 1
  794. 0 807 "{7}" [X]
  795. 13
  796. 0 16 [X] [X]
  797. 13
  798. 8 7
  799. 0 43 "{0}" 8010 "{7}"
  800. 0 43 "{0}" 8000 "{7}"
  801. 0 43 "{0}" 22 "Answer: </p>F"
  802. 10 00001233
  803. 6 5
  804. 7 ""
  805. 18 0
  806. 11 00001233
  807. 0 43 "{0}" 8010 ""
  808. 0 43 "{0}" 22 "Answer: </p>F"
  809. 6 3
  810. 15
  811. 9
  812. 14 InitDlg
  813. 0 32 2
  814. 0 296 1
  815. 16 FontDlg 3 "{0}" 1005
  816. 16 FontDlg 3 "{0}" 1008
  817. 16 FontDlg 3 "{0}" 1003
  818. 16 FontDlg 3 "{0}" 20
  819. 16 FontDlg 3 "{0}" 22
  820. 16 FontDlg 3 "{0}" 21
  821. 0 43 "{0}" 20 1
  822. 0 296 0
  823. 6 3
  824. 15
  825. 9
  826. 14 DisplayHelp
  827. 0 284 "user,FindWindow,HCC" "AmiProWndA" 0
  828. 13
  829. 8 1
  830. 0 798
  831. 13
  832. 0 16 [X] "HelpPack.hlp"
  833. 13
  834. 8 2
  835. 5 70
  836. 8 3
  837. 0 284 "user,WinHelp,HHCHJ" "{1}" "{2}" 1 "{3}"
  838. 6 0
  839. 15
  840. 9
  841. 14 FontDlg
  842. 5 1
  843. 6 0
  844. 18 0
  845. 11 00000255
  846. 0 284 "gdi,CreateFont,HHHHHHHHHHHHHHC" 13 0 0 0 400 0 0 0 0 0 0 0 0 "Helv"
  847. 13
  848. 8 4
  849. 0 271 "FontHandle" 1
  850. 6 4
  851. 11 00000217
  852. 0 264 "FontHandle" "{4}"
  853. 6 4
  854. 15
  855. 9
  856. 10 00000229
  857. 5 0
  858. 15
  859. 9
  860. 10 00000834
  861. 10 00000834
  862. 5 2
  863. 6 0
  864. 18 0
  865. 11 00000381
  866. 0 265 "FontHandle"
  867. 13
  868. 8 5
  869. 6 5
  870. 11 00000356
  871. 6 5
  872. 15
  873. 9
  874. 10 00000368
  875. 5 0
  876. 15
  877. 9
  878. 10 00000834
  879. 5 3
  880. 6 0
  881. 18 0
  882. 11 00000596
  883. 0 265 "FontHandle"
  884. 13
  885. 8 5
  886. 6 5
  887. 11 00000558
  888. 0 44 "{1}" "{2}"
  889. 13
  890. 8 6
  891. 0 284 "user,SendMessage,HHHHJ" "{6}" 48 "{5}" 0
  892. 5 1
  893. 15
  894. 9
  895. 10 00000570
  896. 5 0
  897. 15
  898. 9
  899. 10 00000834
  900. 10 00000834
  901. 5 4
  902. 6 0
  903. 18 0
  904. 11 00000785
  905. 0 265 "FontHandle"
  906. 13
  907. 8 5
  908. 6 5
  909. 11 00000730
  910. 0 284 "gdi,DeleteObject,HH" "{5}"
  911. 5 1
  912. 8 7
  913. 10 00000740
  914. 5 0
  915. 8 7
  916. 0 266 "FontHandle"
  917. 6 7
  918. 15
  919. 9
  920. 10 00000834
  921. 0 3 "Fontdlg received an invalid parameter {0}"
  922. 6 3
  923. 15
  924. 9
  925. DIALOG QuickTemp
  926. -2134376448 10 56 36 140 85 "" "AmiDialog" "QuickTemp" 
  927. FONT 8 "Helv" 
  928. 34 43 36 12 8001 1350631424 "edit" "" 0 
  929. 8 61 80 10 20 1342242825 "button" "░&Fahrenheit to Celsius" 0 
  930. 8 71 82 11 21 1342242825 "button" "░&Celsius to Fahrenheit" 0 
  931. 95 3 40 14 1 1342373889 "button" "Done" 0 
  932. 95 19 40 14 3 1342373888 "button" "Copy" 0 
  933. 4 2 26 34 1001 1342177290 "static" "" 0 
  934. 97 61 30 11 8010 1342177280 "static" "" 0 
  935. 34 15 49 27 1008 1342177280 "static" "" 0 
  936. 91 39 43 41 22 1342177287 "button" "Answer: ░C" 0 
  937. 199 48 50 12 8000 1350566016 "edit" "" 0 
  938. 00017415
  939.